package com.woniuxy.threeproject.end_water_project_user.service.impl;

import com.alipay.api.AlipayApiException;
import com.woniuxy.threeproject.end_water_project_user.domain.AlipayBean;
import com.woniuxy.threeproject.end_water_project_user.config.Alipay;
import com.woniuxy.threeproject.end_water_project_user.service.PayService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
@Slf4j
public class PayServiceImpl implements PayService {
    @Resource
    private Alipay alipay;

    /**
     * 支付宝支付接口
     * @param alipayBean
     * @return
     * @throws AlipayApiException
     */
    @Override
    public String aliPay(AlipayBean alipayBean) throws AlipayApiException {
        return alipay.pay(alipayBean);
    }
}
